{% extends 'old-bootstrap-modal-layout.html.twig' %}
{% set modalSize = 'large' %}

{% block title %}{{ 'site.org.setup'|trans }}{% endblock %}
{% block body %}
  {#添加admin_v2#}
  {% if setting('backstage.is_v2',0)  == 0 %}
    {% set dataUrl = path('admin_batch_update_org',{module:module}) %}
  {% else %}
    {% set dataUrl=  path('admin_v2_batch_update_org',{module:module}) %}
  {% endif %}

  <form id="batch-setting-org-form" class="form-horizontal" method="post" action="{{ dataUrl }}">
    {% include 'org/org-tree-select.html.twig' with {orgCode: app.request.get('orgCode'), modal: 'modal'} %}
    <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
    <input type="hidden" name="ids" id="batch-ids">
    <input type="hidden" id="module" value="{{ module }}">
    <input type="hidden" id="appUserId" value="{{ app.user.id }}">
  </form>
{% endblock %}

{% block footer %}
  <span class="js-user-help  pull-left color-gray hidden">{{ 'site.org.modify_tips'|trans }}</span>
  <button id="batch-setting-org-btn" data-submiting-text="{{ 'form.btn.submit.submiting'|trans }}" type="submit" class="btn btn-primary pull-right"
          data-toggle="form-submit" data-target="#batch-setting-org-form">{{ 'form.btn.submit'|trans }}
  </button>
  <button type="button" class="btn btn-link pull-right" data-dismiss="modal">{{ 'form.btn.cancel'|trans }}</button>
  <script>app.load('topxiaadminbundle/controller/org/batch-org-modal')</script>
{% endblock %}
